package com.xnyzc.lhy.common.penum.work;

/**
 * 是否打卡
 * zhuyubin
 */
public enum EWorkRecordType {

    yes(0, "是"),
    no(1, "否");

    private Integer type;
    private String value;

    EWorkRecordType(Integer type, String value) {
        this.type = type;
        this.value = value;
    }

    public static EWorkRecordType findById(Integer type) {
        EWorkRecordType eWorkRecordType;
        switch (type) {
            case 0:
                eWorkRecordType = EWorkRecordType.yes;
                break;
            case 1:
                eWorkRecordType = EWorkRecordType.no;
                break;
            default:
                throw new IllegalArgumentException("非法type");
        }
        return eWorkRecordType;
    }

    public String getValue() {
        return this.value;
    }

    public Integer getType() {
        return this.type;
    }

}
